export default {
  path: '/',
  name: 'Layout',
  // redirect: '/',
  component: () => import('@/layout/index.vue'),
  meta: {},
  children: [
    {
      path: '/',
      name: 'HomePage',
      component: () => import('@/views/home/index.vue'),
      meta: {
        titleKey: 'homePage',      // 用于 Tab 和面包屑的标题Key
        icon: 'HomeFilled', // 图标 (需要全局注册或按需导入)
        isShow: true,       // 在菜单中显示
        isAffix: false,      // 是否固定在 Tabs 上，不可关闭
        isKeepAlive: true,  // 是否缓存
      }
    },

    {
      path: 'ability',
      name: 'Ability',
      meta: {
        isShow: true,
        titleKey: 'ability',
        icon: 'Folder', // 给父菜单也加个图标
        isKeepAlive: true,  // 是否缓存
      },
      children: [
        {
          path: '/ability/guide',
          name: 'GuidePage',
          component: () => import('@/views/ability/guide.vue'),
          meta: {
            isShow: true,
            titleKey: 'guidePage',
            icon: 'Menu',
            isKeepAlive: true,  // 是否缓存
          }
        },
        {
          path: '/ability/quill',
          name: 'QuillPage',
          component: () => import('@/views/ability/quill.vue'),
          meta: {
            isShow: false,
            titleKey: '富文本',
            icon: 'Menu',
            isKeepAlive: true,  // 是否缓存
          }
        },
        {
          path: '/ability/excel',
          name: 'ExcelPage',
          component: () => import('@/views/ability/excel.vue'),
          meta: {
            isShow: true,
            titleKey: 'excelPage',
            icon: 'Menu',
            isKeepAlive: true,  // 是否缓存
          }
        },
        {
          path: '/ability/panel',
          name: 'PanelPage',
          component: () => import('@/views/ability/panel.vue'),
          meta: {
            isShow: true,
            titleKey: 'panelPage',
            icon: 'Menu',
            isKeepAlive: true,  // 是否缓存
          }
        },
      ]
    },
    {
      path: '/project',
      name: 'ProjectPage',
      component: () => import('@/views/project/index.vue'),
      meta: {
        isShow: true,
        titleKey: 'projectPage',
        icon: 'Files',
        isKeepAlive: true,  // 是否缓存
      }
    },
    {
      path: '/user',
      name: 'UserPage',
      component: () => import('@/views/user/index.vue'),
      meta: {
        titleKey: 'userPage',
        isShow: true,
        icon: 'User',
        isKeepAlive: true,  // 是否缓存
      }
    },
    {
      path: '/role',
      name: 'RolePage',
      component: () => import('@/views/role/index.vue'),
      meta: {
        titleKey: 'rolePage',
        isShow: true,
        icon: 'Avatar',
        isKeepAlive: true,  // 是否缓存
      }
    },
    {
      path: '/auth',
      name: 'AuthPage',
      component: () => import('@/views/auth/index.vue'),
      meta: {
        titleKey: 'authPage',
        isShow: true,
        icon: 'Lock',
        isKeepAlive: true,  // 是否缓存
      }
    },
  ]
};
